package com.moxiao.yfjh.module.blind.controller.app.controller.user.vo;

import com.moxiao.yfjh.framework.common.validation.InEnum;
import com.moxiao.yfjh.framework.common.validation.Mobile;
import com.moxiao.yfjh.module.system.enums.sms.SmsSceneEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotEmpty;
import java.time.LocalDateTime;

/**
 * @version 1.0
 * @Author zhk
 * @Date 2024/1/11 16:10
 **/

@Schema(description = "用户 APP - 手机 + 验证码登录 Request VO,如果登录并绑定社交用户，需要传递 social 开头的参数")
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class AppBlindAuthPhoneLoginReqVO {

    @Schema(description = "手机号", requiredMode = Schema.RequiredMode.REQUIRED, example = "15601691300")
    @NotEmpty(message = "手机号不能为空")
    @Mobile
    private String mobile;

    @Schema(description = "手机验证码", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
    private String code;


    @Schema(description = "分销员id，由分销二维码扫码获得分销员的userid/id（会员id）")
    private String distributors;

    @Schema(description = "发送场景,对应 SmsSceneEnum 枚举", example = "1")
//    @NotNull(message = "发送场景不能为空")
    @InEnum(SmsSceneEnum.class)
    private Integer scene;

    @Schema(description = "系统信息")
    private String system;

    @Schema(description = "设备类型", example = "2")
    private String deviceType;

    @Schema(description = "设备id", example = "29485")
    private String deviceId;

    /**
     * app:token的过期时间
     */
    private LocalDateTime expiresTime;
}
